package cn.com.lms.business.organization.persistence.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "bnz_sys_department", schema = "bnzj", catalog = "")
public class FbSysDepartmentEntity {
    private long id;
    private Long pid;
    private String name;
    private String code;
    private String departmentHead;
    private String departmentVp;
    private String fullName;
    private Byte sequence;
    private boolean enabled;
    private String pathIndex;
    private String creator;
    private Timestamp createTime;
    private String modifyBy;
    private Timestamp modifyTime;
    private String creatorName;
    private String modifyName;

    @Id
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "pid")
    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "department_head")
    public String getDepartmentHead() {
        return departmentHead;
    }

    public void setDepartmentHead(String departmentHead) {
        this.departmentHead = departmentHead;
    }

    @Basic
    @Column(name = "department_vp")
    public String getDepartmentVp() {
        return departmentVp;
    }

    public void setDepartmentVp(String departmentVp) {
        this.departmentVp = departmentVp;
    }

    @Basic
    @Column(name = "full_name")
    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    @Basic
    @Column(name = "sequence")
    public Byte getSequence() {
        return sequence;
    }

    public void setSequence(Byte sequence) {
        this.sequence = sequence;
    }

    @Basic
    @Column(name = "enabled")
    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    @Basic
    @Column(name = "path_index")
    public String getPathIndex() {
        return pathIndex;
    }

    public void setPathIndex(String pathIndex) {
        this.pathIndex = pathIndex;
    }

    @Basic
    @Column(name = "creator")
    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "modify_by")
    public String getModifyBy() {
        return modifyBy;
    }

    public void setModifyBy(String modifyBy) {
        this.modifyBy = modifyBy;
    }

    @Basic
    @Column(name = "modify_time")
    public Timestamp getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Timestamp modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Basic
    @Column(name = "creator_name")
    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    @Basic
    @Column(name = "modify_name")
    public String getModifyName() {
        return modifyName;
    }

    public void setModifyName(String modifyName) {
        this.modifyName = modifyName;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FbSysDepartmentEntity that = (FbSysDepartmentEntity) o;
        return id == that.id &&
                enabled == that.enabled &&
                Objects.equals(pid, that.pid) &&
                Objects.equals(name, that.name) &&
                Objects.equals(code, that.code) &&
                Objects.equals(departmentHead, that.departmentHead) &&
                Objects.equals(departmentVp, that.departmentVp) &&
                Objects.equals(fullName, that.fullName) &&
                Objects.equals(sequence, that.sequence) &&
                Objects.equals(pathIndex, that.pathIndex) &&
                Objects.equals(creator, that.creator) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(modifyBy, that.modifyBy) &&
                Objects.equals(modifyTime, that.modifyTime) &&
                Objects.equals(creatorName, that.creatorName) &&
                Objects.equals(modifyName, that.modifyName) ;
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, pid, name, code, departmentHead, departmentVp, fullName, sequence, enabled, pathIndex, creator, createTime, modifyBy, modifyTime, creatorName, modifyName);
    }
}
